/**
 * 描述：表单维护页面布局
 * 作者：zhaohaibo
 * 日期：3/22/2019
 * 版本：0.0.1
 **/

(function(E, KIT, RES) {
  var _buildTitle = function(title) {
    return E.view({cssClass: "r-p-l r-p-tb-sm r-bold r-bd-b r-bg-0-3 " + KIT.BD_COLOR}, title);
  };

  rapid.Page.create("FormDesigner", {
    render: {

      titleBar: "表单维护",
      other: E.block(
        E.window("wndExampleMenu",
          E.dataview("frmExampleMenu")
        ),
          E.window("wndAutoCode",
              E.dataview("frmAutoCode"),
              E.view({cssClass: "r-p-l r-p-tb-sm r-bold r-bd-b r-bg-0-3 " + KIT.BD_COLOR}, "预览"),
              E.view({id:"idview", cssClass: "r-p-l r-p-tb-sm r-bold r-bd-b r-bg-0-3 " + KIT.BD_COLOR})
          )
      )
      ,
      main:
        E.flex({cssClass: "r-full-h r-border-box r-p"},
          E.view({cssClass: "r-full-h r-m-r-sm r-bd " + KIT.BD_COLOR, cssStyle: "width:22.5em"},
            E.flexv({cssClass: "r-full-h r-bg-0"},
              _buildTitle("表单名"),
              E.flex({cssClass: "r-p-m-sm"},
                E.button({
                  id: "btnAddForm", icon: "fa-plus", text: "新建", style: "link"
                })
              ),
                E.div(E.textbox({id: "txtSearch", mode: "search", tip: "表单名称或编号...", cssClass: "r-col-6"})),

                E.flexitem({id: "lstForm", cssClass: "r-bd-t " + KIT.BD_COLOR})
            )
          ),
          E.flexitem({cssClass: "r-full-h r-overflow-hide r-bd " + KIT.BD_COLOR},
            E.flexv({cssClass: "r-full-h"},
              _buildTitle("表单字段结构"),
              E.view({cssStyle: "height:50%"},
                E.grid("grd")
              ),
              _buildTitle("参与角色").addClass("r-bd-rl"),
              E.flexitem({cssClass: "r-overflow-hide"},
                E.grid("grdrole")
              )
            )
          )
        )
    }
  });

})(rapid.html.Element, rapid.kit, rapid.res);